function Read-Companies {
    [CmdletBinding()]
    param (
        [Parameter(Mandatory = $false)][string][ValidateScript({ Test-Path $_ -PathType "Leaf" })]$FilePath
    )

    # Read companies from a file. Ignores blank lines and whitespaces. Removes duplicates.
    [string[]]$Companies = Get-Content -Path $FilePath | Where-Object { $_ -match '[^\s]' } | Sort-Object | Get-Unique

    Write-Verbose "Read $($Companies.Count) companies from file."

    return $Companies
}